const axios = require("axios");
exports.install = function (app) {
    // app.config.globalProperties.$target = "http://server.com.cn"; // 本地后端地址
    app.config.globalProperties.$target = "http://localhost:8080"; // 本地后端地址
    app.config.globalProperties.$axios = axios;
    app.config.globalProperties.$config = {
        headers: {
            'Content-Type': 'application/json;charset=utf-8'
        }
    }
//  封装提示信息
    app.config.globalProperties.notify = function (title,msg, type) {
        this.$notify({
            title: title,
            message: msg,
            type: type,
            offset: 100
        });
    }
    app.config.globalProperties.notifySucceed = function (msg) {
        this.notify("成功",msg, "success")
    }
    app.config.globalProperties.notifyError = function (msg) {
        this.notify("错误",msg, "error")
    }
}
